<template>
  <el-dialog title="扫码预览" :visible.sync="isShow">
    <div style="text-align:center">
      <canvas ref="canvas" />
    </div>
  </el-dialog>
</template>
<script>
import Qrcode from 'qrcode'
export default {
  data() {
    return {
      isShow: false
    }
  },

  methods: {
    createImgCode(url) {
      // console.log('canvasDom:', this.$refs.canvas)
      Qrcode.toCanvas(this.$refs.canvas, url, {
        width: 400
      })
    }
  }
}
</script>
<style>
</style>
